﻿<!DOCTYPE html>

<html class="x-admin-sm">
<head>
    <meta name="viewport" content="width=device-width" />
    <meta charset="UTF-8">
    <title>条码库存</title>
    <meta name="renderer" content=padding>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <link href="~/js/layui/css/layui.css" rel="stylesheet" />
    <link href="~/X-admin/css/font.css" rel="stylesheet" />
    <script src="~/X-admin/lib/layui/layui.js"></script>
    <link href="~/X-admin/css/xadmin.css" rel="stylesheet" />
    <script src="~/X-admin/js/jquery.min.js"></script>
    <script src="~/X-admin/js/xadmin.js"></script>
</head>
<body>
    <div class="layui-fluid" style="width:100%;">
        <div id="bDiv">
        </div>
        <div style="float:left;width:100%;">
            <div class="layui-card">

                <div class="layui-card-body layui-table-body layui-table-main" id="layui-table-main">
                    <table class="layui-hide" id="list" lay-filter="list"></table>
                </div>
            </div>


        </div>
        <form id="qForm" name="qForm">
            <input type="hidden" name="proCode" id="proCode" />
            <input type="hidden" name="wareHouse" id="wareHouse" />
        </form>
    </div>
</body>
</html>
<script src="~/js/framework/sysframework.js"></script>
<script src="~/js/framework/commonjs.js"></script>

<script>
    var proCode = "",wareHouse="";

    $(function () {
        proCode = getUrlVariable("proCode");
        wareHouse = getUrlVariable("wareHouse");
        $("input[ name='proCode']").val(proCode);
        $("input[ name='wareHouse']").val(wareHouse);
        loadData();
    })

    var dUrl = "../Summary/getDataList?dataType=bsil&condition=";
    /**
     * 加载数据
     * **/
    function loadData() {
        layui.use('table', function () {
            var condition = JSON.stringify(FormToJson("qForm"));
            var table = layui.table;
            table.render({
                elem: '#list'
                , cols: [[ //标题栏
                     { field: 'barCode', align: 'center', title: '条码编码', width: '13%' }
                    , { field: 'proCode', align: 'center', title: '存货编码', width: '12%', }
                    , { field: 'proName', align: 'center', title: '存货名称', width: '10%' }
                    , { field: 'number', align: 'center', title: '主计量数', width: '10%' }
                    , { field: 'proWeight', align: 'center', title: '重量', width: '8%' }
                    , { field: 'houseName', align: 'center', title: '所属仓库', width: '10%' }
                    , { field: 'planCode', align: 'center', title: '关联计划', width: '12%' }
                    , { field: 'gxName', align: 'center', title: '生产工序', width: '9%' }
                    , { field: 'happenDate', align: 'center', title: '发生日期', width: '14%' }
            
                ]], done: function (res, curr, count) {
                    // $("[data-field='id']").css('display', 'none');//隐藏列
                    currPage = curr;

                }
                , url: dUrl + condition
                , skin: 'row' //表格风格
                , even: true
                , page: true //是否显示分页
                , limits: [20, 25, 30]
                , limit: 20 //每页默认显示的数量
                , id: "list"
            });


        });

    }




</script>
